{extend name="common/dialog" /}
{block name="main"}
    <?php foreach($icons as $icon):?>
    <i class="icon icon{$icon}"></i>
    <?php endforeach;?>
{/block}
{block name="footer"}
<script>
layui.use(['form', 'layer'], function () {
    var form = layui.form, layer = layui.layer,$= layui.jquery;
    form.on('submit(submit)', function (data) {
        loading = layer.load(1,{shade:[0.1,'#fff']});
        $.post("", data.field, function (res) {
            layer.close(loading);
            if (res.code > 0) {
                layer.msg(res.msg, {time: 1800, icon: 1}, function () {
                    top.location.reload();
                });
            } else {
                layer.msg(res.msg, {time: 1800, icon: 2});
            }
        });
    })
});
</script>
{/block}